﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataBaseTable;
using MySpace.Data;
using System.Data;

public partial class MasterPage_MasterPage : System.Web.UI.MasterPage
{
    protected WebTable web = new WebTable();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.Binddx();
            this.BindPhoto();
        }
    }
    private void Binddx()
    {
        DBHandler dbh = GetHandler.Init();
        dbh.CommandText = "select BookId,PeriodsName,DIndex from DengXinBook order by dindex desc";
        this.dengxin_list.DataSource = dbh.ExecuteDataTable();
        this.dengxin_list.DataBind();
    }
    private void BindPhoto()
    {
        DataSet ds = new DataSet();
        ds.ReadXml(Server.MapPath(@"~/XML/MenuPhotos.xml"));
        DataView dv = new DataView();
        dv.Table = ds.Tables[0];
        dv.Sort="id desc";
        photo_list.DataSource = dv;
        photo_list.DataBind();
    }
    public string WebSubTitle
    {
        get;
        set;
    }
}
